<html>
<head>
<meta charset="UTF-8">
<title>批次实例信息修改</title>
<link id="easyuiTheme" id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<link href="../../static/easyui/themes/frameless.css" rel="stylesheet" type="text/css"/>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
	<form id="ff" method="post">
		<div class="esaas-info-title">批次实例信息信息</div>
		<table class="esaas-info-edit-table">
			<tr>
				<td width="15%" align="right">批次标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" readOnly
					name="batchId" data-options="required:true, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">批次序号：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="batchOrder" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">批次名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="batchName" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
					
				<td width="15%" align="right">系统代码：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="subsCode" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">批次状态：</td>
				<td width="35%"><select class="easyui-combobox"
					id="batchState" name="batchState"
					style="width: 100%; height: 25px;" 
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:BAT_BATCH_STATE">
				</select></td>
				<td width="15%" align="right">干预状态：</td>
				<td width="35%"><select class="easyui-combobox"
					id="batchInterveneState" name="batchInterveneState"
					style="width: 100%; height: 25px;" 
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:BAT_BATCH_INTERVENE_STATE">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">批次日期：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="batchDate" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">启动时间：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="startTime" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">结束时间：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="endTime" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">需调度任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="needRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">运行中任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="existRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">未运行任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="notRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">运行成功任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="succeedRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">运行失败任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="faildRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">运行警告任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="warnRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">运行置过任务数：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="skipRunCount" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				
			</tr>
			<tr>
				<td width="15%" align="right">批次流水号：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="batchSerialNo" data-options="required:false, readonly: true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">备注：</td>
				<td width="85%" colspan="3"><input class="easyui-textbox" type="text" 
					name="remark" data-options="required:false, multiline: true, readonly: true"
					style="width: 100%; height: 50px;"></input></td>
				
			</tr>
		</table>
	</form>
	<div class="esaas-info-buttons">
		<a href="javascript:void(0)" class="easyui-linkbutton " iconCls="icon-ok" onclick="submitForm()" style="width:90px">&nbsp;保&nbsp;存&nbsp;</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="closeForm()" style="width:90px">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>		
		$(function() {
		    addTitle("修改");

			var batchId = $.getUrlParam('batchId');
			$.restfulGet('../../api/bat/inst/batch/' + batchId,null,function(data){
					$('#ff').form('load', {
						batchId : data.rows.batchId,
						batchOrder : data.rows.batchOrder,
						batchName : data.rows.batchName,
						batchState : data.rows.batchState,
						batchInterveneState : data.rows.batchInterveneState,
						batchDate : data.rows.batchDate,
						startTime : data.rows.startTime,
						endTime : data.rows.endTime,
						needRunCount : data.rows.needRunCount,
						existRunCount : data.rows.existRunCount,
						notRunCount : data.rows.notRunCount,
						succeedRunCount : data.rows.succeedRunCount,
						faildRunCount : data.rows.faildRunCount,
						warnRunCount : data.rows.warnRunCount,
						skipRunCount : data.rows.skipRunCount,
						batchSerialNo : data.rows.batchSerialNo,
						remark : data.rows.remark,
						subsCode : data.rows.subsCode,
						costTime : data.rows.costTime,
						stageName : data.rows.stageName,
						stageId : data.rows.stageId
					});					
			});
		});
	
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPut('../../api/bat/inst/batch', jsonData, function(data) {
				window.parent.reloadList();
			});
		};
		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
